<local:DocumentBase x:Class="WPFExcelReport.YCAAV25"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:me="clr-namespace:WPFExcelReport"
                    xmlns:exc="clr-namespace:IntexReportStudio.UserControls" 
                   Background="White"
                    Loaded="Window_Loaded"
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:QtyColorConverter  x:Key="qtyc"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetProd" />
        <db:SETINTEXDB  x:Key="SetEnv" />
        <CollectionViewSource   x:Key="vwLIEFDAT" Source="{Binding Path=LIEFDAT,Source={StaticResource SetEnv}}" />
        <CollectionViewSource   x:Key="vwFSSTAMM" Source="{Binding Path=FSSTAMM,Source={StaticResource SetEnv}}" />
        <CollectionViewSource   x:Key="vwABPAUF" Source="{Binding Path=ABPAUF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwABPOS" Source="{Binding Path=ABPOS,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwABPOSMAT" Source="{Binding Path=ICC_ABPOS_MAT,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwABPOSEXT" Source="{Binding Path=ICC_ABPOS_EXT,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWDECK" Source="{Binding Path=WDECK,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwFDECK" Source="{Binding Path=FDECK,Source={StaticResource SetProd}}" />
    </local:DocumentBase.Resources>
    <TabControl>
        <TabItem Header="{Binding Source={Localization:Translate Word=入库}}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition   Height="Auto" />
                    <RowDefinition   Height="Auto" />
                    <RowDefinition   Height="*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="1*" />
                    <ColumnDefinition Width="1*"/>
                    <ColumnDefinition Width="1*"/>
                    <ColumnDefinition Width="1*"/>
                </Grid.ColumnDefinitions>
                <StackPanel  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" Margin="0,0,0,115">
                    <WrapPanel Margin="20,0,0,0">
                        <TextBlock Width="Auto" Height="Auto" FontSize="18" VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=款号}}"></TextBlock>
                        <TextBox Name="txtABPART" VerticalAlignment="Center" Background="White"  FontSize="18" HorizontalAlignment="Left"  KeyUp="txtABPART_KeyUp" Margin="3"  Width="200"  />
                        <Button  Width="40" Height="40" Click="cmdLoad_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Search.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Width="Auto" Height="Auto"  FontSize="18"  HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=款式}}"></TextBlock>
                        <TextBlock  Name="txtFSABEZ"  VerticalAlignment="Center" Text="{Binding Path=ARTDES, Source={StaticResource ResourceKey=vwABPOSMAT},Converter={StaticResource ResourceKey=gb2312}}"  Width="180"/>
                        <TextBlock Width="Auto" Height="Auto" FontSize="18" VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=生产单}}"></TextBlock>
                        <TextBox Width="40" Height="Auto"  MaxLength="2"  VerticalAlignment="Center" Name="txtKRS">YF</TextBox>
                        <TextBox Width="100" Height="Auto" MaxLength="6"  VerticalAlignment="Center" Name="txtLFD"></TextBox>
                        <ComboBox  ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPAUF}}"
                            Margin="10,0,0,0"   Height="Auto"
                               SelectionChanged="ABP_SelectionChanged"
                               Background="White"  MinWidth="180" 
                               DisplayMemberPath="ABPAUF"
                               IsEditable="True"
                               SelectedValuePath="ABPAUF"
                       />
                        <Button  Width="40" Height="40" Click="cmdLoadAB_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Find.png" />
                            </Button.Background>
                        </Button>
                    </WrapPanel >
                    <WrapPanel Margin="20,0,0,0">
                        <WrapPanel>
                            <TextBlock Text="{Binding Source={Localization:Translate Word=颜色}}" FontSize="18" Width="Auto"/>
                            <TextBlock Text="{Binding Source={Localization:Translate Word=:}}" FontSize="18" Width="Auto"/>
                            <TextBlock  VerticalAlignment="Center" Text="{Binding Path=CDES, Source={StaticResource ResourceKey=vwABPOSMAT},Converter={StaticResource ResourceKey=gb2312}}" FontSize="18" Width="120"/>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock Text="{Binding Source={Localization:Translate Word=服装厂}}" FontSize="18" Width="Auto"/>
                            <TextBlock Text="{Binding Source={Localization:Translate Word=:}}" FontSize="18" Width="Auto"/>
                            <TextBlock  VerticalAlignment="Center" Text="{Binding Path=EXTFTYNAME, Source={StaticResource ResourceKey=vwABPOSMAT},Converter={StaticResource ResourceKey=gb2312}}" FontSize="18" Width="180"/>
                        </WrapPanel>
                        <Grid Margin="20,0,0,0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="40"></ColumnDefinition>
                                <ColumnDefinition Width="40"></ColumnDefinition>
                                <ColumnDefinition Width="80"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" FontSize="18" FontWeight="Bold"  HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=库位}}"></TextBlock>
                            <TextBlock Text="{Binding Source={Localization:Translate Word=:}}" FontSize="18" Width="Auto"/>
                            <TextBox Grid.Column="1"  Margin="3"  Background="White"  Name="txtLO" FontSize="18" HorizontalAlignment="Stretch" VerticalAlignment="Center"  >01</TextBox>
                            <TextBox Grid.Column="2"  Margin="3"  Background="White"  Name="txtLB" FontSize="18"  HorizontalAlignment="Stretch" VerticalAlignment="Center" >KC</TextBox>
                            <TextBox Grid.Column="3"  Margin="3"  Background="White"  Name="txtLP" FontSize="18"  HorizontalAlignment="Stretch" VerticalAlignment="Center" >01</TextBox>
                            <WrapPanel Grid.Column="4">
                                <Button  Width="30" Height="30" Click="cmdSave_Click">
                                    <Button.Background>
                                        <ImageBrush  ImageSource="Image/Convert.png" />
                                    </Button.Background>
                                </Button>
                                <TextBlock VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=暂存}}"></TextBlock>
                                <WrapPanel>
                                    <Button  Width="30" Height="30" Click="cmdRepairWB_Click">
                                        <Button.Background>
                                            <ImageBrush  ImageSource="Image/Undo.png" />
                                        </Button.Background>
                                    </Button>
                                    <TextBlock VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=修正}}"></TextBlock>
                                </WrapPanel>
                            </WrapPanel>
                        </Grid>
                    </WrapPanel>
                    <Grid Margin="20,0,0,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30"></RowDefinition>
                            <RowDefinition Height="30"></RowDefinition>
                            <RowDefinition Height="30"></RowDefinition>
                            <RowDefinition Height="30"></RowDefinition>
                            <RowDefinition Height="30"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Grid.Row="0" FontSize="18" FontWeight="Bold"   HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=尺码}}"></TextBlock>
                        <TextBlock Grid.Column="0" Grid.Row="1" FontSize="18" FontWeight="Bold"   HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=入库}}"></TextBlock>
                        <TextBlock Grid.Column="0" Grid.Row="2" FontSize="18" FontWeight="Bold"   HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=已收}}"></TextBlock>
                        <TextBlock Grid.Column="0" Grid.Row="3" FontSize="18" FontWeight="Bold"   HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=计划}}"></TextBlock>
                        <TextBlock Grid.Column="0" Grid.Row="4" FontSize="18" FontWeight="Bold"   HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=差异}}"></TextBlock>
                        <WrapPanel  Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <TextBlock FontSize="18" FontWeight="Bold"   >S</TextBlock>
                            <CheckBox Name="chkS" VerticalAlignment="Center" Margin="10,0,0,0"></CheckBox>
                        </WrapPanel>
                        <TextBox Grid.Column="1" Grid.Row="1"  Margin="3"  Background="White"  Name="txtQtyS" KeyUp="txtQty_KeyUp"  GotFocus="txtQty_GotFocus" LostFocus="txtQty_LostFocus" TabIndex="1"
                                             Text="{Binding Path=SY, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <TextBlock Grid.Column="1" Grid.Row="2" Background="White" Text="{Binding Path=S, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <TextBlock Grid.Column="1" Grid.Row="3" Background="White"     Text="{Binding Path=SP, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <WrapPanel  Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <TextBlock FontSize="18" FontWeight="Bold"   >M</TextBlock>
                            <CheckBox Name="chkM" VerticalAlignment="Center" Margin="10,0,0,0"></CheckBox>
                        </WrapPanel>
                        <TextBox Grid.Column="2" Grid.Row="1"  Margin="3"  Background="White"  Name="txtQtyM" KeyUp="txtQty_KeyUp"  GotFocus="txtQty_GotFocus" LostFocus="txtQty_LostFocus" TabIndex="2"
                            Text="{Binding Path=MY, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <TextBlock Grid.Column="2" Grid.Row="2" Background="White" Text="{Binding Path=M, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <TextBlock Grid.Column="2" Grid.Row="3" Background="White"     Text="{Binding Path=MP, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <WrapPanel  Grid.Column="3" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <TextBlock FontSize="18" FontWeight="Bold"   >L</TextBlock>
                            <CheckBox Name="chkL" VerticalAlignment="Center" Margin="10,0,0,0"></CheckBox>
                        </WrapPanel>

                        <TextBox Grid.Column="3" Grid.Row="1"  Margin="3"  Background="White"  Name="txtQtyL" KeyUp="txtQty_KeyUp"  GotFocus="txtQty_GotFocus" LostFocus="txtQty_LostFocus" TabIndex="3"
                            Text="{Binding Path=LY, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <TextBlock Grid.Column="3" Grid.Row="2" Background="White" Text="{Binding Path=L, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <TextBlock Grid.Column="3" Grid.Row="3" Background="White"     Text="{Binding Path=LP, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <WrapPanel  Grid.Column="4" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center">
                            <TextBlock FontSize="18" FontWeight="Bold"   >XL</TextBlock>
                            <CheckBox Name="chkXL" VerticalAlignment="Center" Margin="10,0,0,0"></CheckBox>
                        </WrapPanel>
                        <TextBox Grid.Column="4" Grid.Row="1"  Margin="3"  Background="White"  Name="txtQtyXL" KeyUp="txtQty_KeyUp"  GotFocus="txtQty_GotFocus" LostFocus="txtQty_LostFocus" TabIndex="4"
                            Text="{Binding Path=XY, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <TextBlock Grid.Column="4" Grid.Row="2" Background="White" Text="{Binding Path=XL, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <TextBlock Grid.Column="4" Grid.Row="3" Background="White"     Text="{Binding Path=XLP, Source={StaticResource ResourceKey=vwABPOSMAT}}" FontSize="18" Width="60"/>
                        <WrapPanel  Grid.Column="5" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center">
                            <TextBlock FontSize="14" Width="Auto" Text="{Binding Source={Localization:Translate Word=如果本批次小于计划数量确认完成，可勾选}}" ></TextBlock>
                        </WrapPanel>
                        <WrapPanel  Grid.Column="5" Grid.Row="1" >
                            <Button Name="btnSave"  Width="30" Height="30" Click="cmdNewEntry_Click">
                                <Button.Background>
                                    <ImageBrush  ImageSource="Image/Save.png" />
                                </Button.Background>
                            </Button>
                            <TextBlock VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=保存}}"></TextBlock>
                        </WrapPanel>
                    </Grid> 
                </StackPanel>
                <DockPanel Grid.Column="0" Grid.ColumnSpan="3" Margin="0,221,0,0" Grid.RowSpan="3" >
                    <DataGrid 
                    AutoGenerateColumns="False"
                    EnableRowVirtualization="False"
                    VerticalScrollBarVisibility="Auto"
                    HorizontalScrollBarVisibility="Auto"
                    HeadersVisibility="Column" 
                    FontSize="18"
                    MaxHeight="300"
                    IsReadOnly="True"
                    ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOSMAT}}"  
                    x:Name="dlgABPOS" 
                    Margin="0,1,0,0" 
                    RowDetailsVisibilityMode="Visible"
                    >
                        <DataGrid.RowDetailsTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions >
                                        <RowDefinition Height="30"></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="1*"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Source={Localization:Translate Word=计划数(已入库)}}"></TextBlock>
                                    <WrapPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center">
                                        <TextBlock>S:</TextBlock>
                                        <TextBlock Foreground="Red" FontSize="16" Text="{Binding Path=SP}"/>
                                        <TextBlock>(</TextBlock>
                                        <TextBlock Foreground="Green" FontSize="16" Text="{Binding Path=S}"/>
                                        <TextBlock>)</TextBlock>
                                        <TextBlock>M:</TextBlock>
                                        <TextBlock Foreground="Red" FontSize="16" Text="{Binding Path=MP}"/>
                                        <TextBlock>(</TextBlock>
                                        <TextBlock Foreground="Green" FontSize="16" Text="{Binding Path=M}"/>
                                        <TextBlock>)</TextBlock>
                                        <TextBlock>L:</TextBlock>
                                        <TextBlock Foreground="Red" FontSize="16"  Text="{Binding Path=LP}"/>
                                        <TextBlock>(</TextBlock>
                                        <TextBlock Foreground="Green" FontSize="16" Text="{Binding Path=L}"/>
                                        <TextBlock>)</TextBlock>
                                        <TextBlock>XL:</TextBlock>
                                        <TextBlock Foreground="Red" FontSize="16" Text="{Binding Path=XLP}"/>
                                        <TextBlock>(</TextBlock>
                                        <TextBlock Foreground="Green" FontSize="16" Text="{Binding Path=XL}"/>
                                        <TextBlock>)</TextBlock>
                                    </WrapPanel>
                                </Grid>
                            </DataTemplate>
                        </DataGrid.RowDetailsTemplate>
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="{Binding Source={Localization:Translate Word=颜色}}"   Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=CDES,Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=颜色}}"   Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=TQTYP}" Header="{Binding Source={Localization:Translate Word=下单数}}"   Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PPQTY}" Header="{Binding Source={Localization:Translate Word=已入库数}}"   Width="Auto" >
                                <!--DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="Foreground" Value="{Binding Path=DQTY,Converter={StaticResource ResourceKey=qtyc}}"></Setter>
                                    <Setter Property="HorizontalAlignment" Value="Center"></Setter>
                                </Style>
                            </DataGridTextColumn.ElementStyle-->
                            </DataGridTextColumn>
                            <DataGridTextColumn Binding="{Binding Path=SY}" Header="{Binding Source={Localization:Translate Word=待S}}"   Width="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MY}" Header="{Binding Source={Localization:Translate Word=M}}"   Width="40"/>
                            <DataGridTextColumn Binding="{Binding Path=LY}" Header="{Binding Source={Localization:Translate Word=L}}"   Width="40"/>
                            <DataGridTextColumn Binding="{Binding Path=XLY}" Header="{Binding Source={Localization:Translate Word=XL}}"   Width="40"/>
                        </DataGrid.Columns>
                    </DataGrid  >
                </DockPanel>
                <DockPanel Grid.Column="3" Grid.ColumnSpan="1" Margin="0,221,0,0" Grid.RowSpan="3">
                    <StackPanel DockPanel.Dock="Top">
                        <TextBlock Text="{Binding Source={Localization:Translate Word=待处理}}"></TextBlock>
                        <ListView Name="list01">
                        </ListView>
                        <TextBlock Text="{Binding Source={Localization:Translate Word=转换队列}}"></TextBlock>
                        <ListView Name="list02">
                        </ListView>
                    </StackPanel>
                </DockPanel>
            </Grid>
        </TabItem>
        <TabItem Header="{Binding Source={Localization:Translate Word=暂停任务}}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition   Height="Auto" />
                    <RowDefinition   Height="Auto" />
                    <RowDefinition   Height="*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="2*" />
                    <ColumnDefinition Width="1*"/>
                </Grid.ColumnDefinitions>
                <StackPanel  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                    <WrapPanel>
                        <Button Width="30" Height="30" Click="cmdLoadExisting_Click">
                            <Button.Background>
                                <ImageBrush  ImageSource="Image/Reload.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=载入}}"></TextBlock>
                        <WrapPanel  Grid.Column="5" Grid.Row="1" >
                            <Button  Width="30" Height="30" Click="cmdNewEntry_Click">
                                <Button.Background>
                                    <ImageBrush  ImageSource="Image/Save.png" />
                                </Button.Background>
                            </Button>
                            <TextBlock VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=再入库}}"></TextBlock>
                        </WrapPanel>
                        <WrapPanel  Grid.Column="5" Grid.Row="1" >
                            <Button  Width="30" Height="30" Margin="40,0,0,0" Click="cmdRemove_Click">
                                <Button.Background>
                                    <ImageBrush  ImageSource="Image/Delete.png" />
                                </Button.Background>
                            </Button>
                            <TextBox Name="txtDFlag">N</TextBox>
                            <TextBlock VerticalAlignment="Center" Text="{Binding Source={Localization:Translate Word=删除}}"></TextBlock>
                        </WrapPanel>
                    </WrapPanel>
                    <WrapPanel>
                        <TextBlock  Text="{Binding Source={Localization:Translate Word=生产单}}" Margin="20,0,0,0"/>
                        <TextBox Margin="20,0,0,0" Name="PLFD" Text="000666"></TextBox>
                        <Button Content="{Binding Source={Localization:Translate Word=过滤}}" Margin="20,0,0,0" Click="btnFilter_Click"></Button>
                        <Button Content="{Binding Source={Localization:Translate Word=清除}}" Margin="20,0,0,0" Click="btnFilterClear_Click"></Button>
                    </WrapPanel>
                </StackPanel>
                <DockPanel  Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" >
                    <DataGrid 
                    AutoGenerateColumns="False"
                    EnableRowVirtualization="False"
                    VerticalScrollBarVisibility="Auto"
                    HorizontalScrollBarVisibility="Auto"
                    HeadersVisibility="Column" 
                    FontSize="12"
                    IsReadOnly="True"
                        Name="dlgPMAT"
                    ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOSMAT}}"  
                    Margin="0,1,0,0" 
                    RowDetailsVisibilityMode="Visible"
                    >
                        <DataGrid.RowDetailsTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions >
                                        <RowDefinition Height="30"></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        <ColumnDefinition Width="1*"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Source={Localization:Translate Word=计划数(已入库):}}"></TextBlock>
                                    <WrapPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left">
                                        <TextBlock>S:</TextBlock>
                                        <TextBlock Foreground="Red" FontSize="16" Text="{Binding Path=SP}"/>
                                        <TextBlock>(</TextBlock>
                                        <TextBlock Foreground="Green" FontSize="16" Text="{Binding Path=S}"/>
                                        <TextBlock>)</TextBlock>
                                        <TextBlock>M:</TextBlock>
                                        <TextBlock Foreground="Red" FontSize="16" Text="{Binding Path=MP}"/>
                                        <TextBlock>(</TextBlock>
                                        <TextBlock Foreground="Green" FontSize="16" Text="{Binding Path=M}"/>
                                        <TextBlock>)</TextBlock>
                                        <TextBlock>L:</TextBlock>
                                        <TextBlock Foreground="Red" FontSize="16"  Text="{Binding Path=LP}"/>
                                        <TextBlock>(</TextBlock>
                                        <TextBlock Foreground="Green" FontSize="16" Text="{Binding Path=L}"/>
                                        <TextBlock>)</TextBlock>
                                        <TextBlock>XL:</TextBlock>
                                        <TextBlock Foreground="Red" FontSize="16" Text="{Binding Path=XLP}"/>
                                        <TextBlock>(</TextBlock>
                                        <TextBlock Foreground="Green" FontSize="16" Text="{Binding Path=XL}"/>
                                        <TextBlock>)</TextBlock>
                                    </WrapPanel>
                                </Grid>
                            </DataTemplate>
                        </DataGrid.RowDetailsTemplate>
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ABPAUFART}" Header="{Binding Source={Localization:Translate Word=类型}}"   Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=KRS}" Header=""   Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=LFD}" Header="{Binding Source={Localization:Translate Word=生产单}}"   Width="Auto"  MinWidth="80"  />
                            <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="{Binding Source={Localization:Translate Word=款号}}"   Width="Auto" MinWidth="100" />
                            <DataGridTextColumn Binding="{Binding Path=ABPFARBE,Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:Translate Word=颜色}}"   Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=CDES,Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:Translate Word=颜色}}"   Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=TQTYP}" Header="{Binding Source={Localization:Translate Word=下单数}}"   Width="Auto" />
                            <DataGridTextColumn Binding="{Binding Path=PPQTY}" Header="{Binding Source={Localization:Translate Word=已入库数}}"   Width="Auto" >
                                <!--DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="Foreground" Value="{Binding Path=DQTY,Converter={StaticResource ResourceKey=qtyc}}"></Setter>
                                    <Setter Property="HorizontalAlignment" Value="Center"></Setter>
                                </Style>
                            </DataGridTextColumn.ElementStyle-->
                            </DataGridTextColumn>
                            <DataGridTextColumn Binding="{Binding Path=SY}" Header="{Binding Source={Localization:Translate Word=待S}}"   Width="Auto"/>
                            <DataGridTextColumn Binding="{Binding Path=MY}" Header="{Binding Source={Localization:Translate Word=M}}"   Width="40"/>
                            <DataGridTextColumn Binding="{Binding Path=LY}" Header="{Binding Source={Localization:Translate Word=L}}"   Width="40"/>
                            <DataGridTextColumn Binding="{Binding Path=XLY}" Header="{Binding Source={Localization:Translate Word=XL}}"   Width="40"/>
                        </DataGrid.Columns>
                    </DataGrid  >
                    <exc:EventLog   x:Name="_LogExplorerDock"  DockPanel.Dock="Right"></exc:EventLog>
                </DockPanel>
            </Grid>
        </TabItem>
        <TabItem Header="{Binding Source={Localization:Translate Word=原料信息}}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <DataGrid   Grid.Row="0" Grid.Column="0" 
                                    Name="dlgWDECK"
                              AutoGenerateColumns="False"
                                    MaxHeight="200"
                              EnableRowVirtualization="True"          
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwWDECK}}"
                              HeadersVisibility="Column"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto"  
                              >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=WDAUFPOS}" Header="{Binding Source={Localization:Translate Word=行}}"  Width="Auto" MinWidth="100"/>
                        <DataGridTextColumn Binding="{Binding Path=WDART}" Header="{Binding Source={Localization:Translate Word=面料}}"  Width="Auto" MinWidth="100"/>
                        <DataGridTextColumn Binding="{Binding Path=WDFARBE}" Header="{Binding Source={Localization:Translate Word=颜色}}"  Width="Auto" MinWidth="100"/>
                        <DataGridTextColumn Binding="{Binding Path=ABARESMG}" Header="{Binding Source={Localization:Translate Word=需求数}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=EKPAUFKRS}" Header=""  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=EKPAUFLFD}" Header="{Binding Source={Localization:Translate Word=采购单}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=EKPAUFPOS}" Header=""  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=EKPME1,Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:Translate Word=采购}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=EKPME3,Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:Translate Word=已入}}"  Width="Auto" MinWidth="40"/>
                    </DataGrid.Columns>
                </DataGrid>
                <DataGrid    Grid.Row="0" Grid.Column="1" 
                                    Name="dlgFDECK"
                                    AutoGenerateColumns="False"
                                    MaxHeight="200"
                                    EnableRowVirtualization="True"                             
                                    ItemsSource="{Binding Source={StaticResource ResourceKey=vwFDECK}}"
                                    HeadersVisibility="Column"
                                    ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                    ScrollViewer.VerticalScrollBarVisibility="Auto"  
                    >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=FDAUFPOS}" Header="{Binding Source={Localization:Translate Word=行}}"  Width="Auto" MinWidth="100"/>
                        <DataGridTextColumn Binding="{Binding Path=FDART}" Header="{Binding Source={Localization:Translate Word=面料}}"  Width="Auto" MinWidth="100"/>
                        <DataGridTextColumn Binding="{Binding Path=FDFARBE}" Header="{Binding Source={Localization:Translate Word=颜色}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=FDGROE}" Header="{Binding Source={Localization:Translate Word=尺寸}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=ABARESMG}" Header="{Binding Source={Localization:Translate Word=需求数}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=EKPAUFKRS}" Header=""  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=EKPAUFLFD}" Header="{Binding Source={Localization:Translate Word=采购单}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=EKPAUFPOS}" Header=""  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=EKPME1,Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:Translate Word=采购}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=EKPME3,Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:Translate Word=已入}}"  Width="Auto" MinWidth="40"/>
                    </DataGrid.Columns>
                </DataGrid>
                <DataGrid Grid.Row="1"  Grid.Column="0" Grid.ColumnSpan="2"
                          AutoGenerateColumns="False"
                          EnableRowVirtualization="True"  
                          MaxHeight="300"
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOS}}"
                          HeadersVisibility="Column"
                          ScrollViewer.HorizontalScrollBarVisibility="Auto"
                          ScrollViewer.VerticalScrollBarVisibility="Auto"  
                          >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="{Binding Source={Localization:Translate Word=颜色}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=ABPGROE}" Header="{Binding Source={Localization:Translate Word=尺寸}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=ABPSOLLMENGE7,Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:Translate Word=计划}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=ABPEALFM,Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:Translate Word=已入}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=ABPEAKG}" Header="{Binding Source={Localization:Translate Word=本次}}"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=ABPERLKZ}" Header="{Binding Source={Localization:Translate Word=完成}}"  Width="Auto" MinWidth="40"/>
                    </DataGrid.Columns>
                </DataGrid>
            </Grid>
        </TabItem>
    </TabControl>
</local:DocumentBase>
